//
//  HomeCateView.swift
//  LeGou
//
//  Created by lxm on 2022/7/27.
//

import UIKit

class HomeCateView: ZMXIBView {

    //MARK: --------------------属性--------------------

    //MARK: --------------------UI控件--------------------
    @IBOutlet weak var cateView: HomeRecommendCateView_V2!
    //MARK: --------------------生命周期--------------------
    override init(frame: CGRect) {
        super.init(frame: frame)
        setUI()
        bindAction()
        addConstraints()
    }
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        setUI()
        bindAction()
        addConstraints()
    }

    //MARK: --------------------UI--------------------
    func setUI() {
        var dataA : [HomeCate]!
        
        
        if AppHelper.appVerify() {
            dataA = [
                HomeCate.taobao,
                HomeCate.PDD,
                HomeCate.JD,
                HomeCate.phoneCharge,
                HomeCate.power,
                HomeCate.zeroBuy,
                HomeCate.mt,
                HomeCate.elm,
                HomeCate.U99,
                HomeCate.heighFee,
                HomeCate.douyin,
                HomeCate.lianlian
            ]
        } else {
            dataA = [
                HomeCate.taobao,
                HomeCate.PDD,
                HomeCate.JD,
                HomeCate.phoneCharge,
                HomeCate.power,
                HomeCate.oil,
                HomeCate.douyin,
                
                HomeCate.zeroBuy,
                HomeCate.mt,
                HomeCate.elm,
                HomeCate.U99,
                HomeCate.tasks,
                HomeCate.heighFee,
                HomeCate.lianlian
            ]
        }
        
        cateView.dataSorce = dataA
    }
    
    func addConstraints() {
     
    }
    
    //MARK: --------------------methods--------------------
    func bindAction() {
        
    }
    //MARK: --------------------delegate--------------------

}
